home *** CD-ROM | disk | FTP | other *** search
/ Power DOS 1996 July / Power DOS - July 1996.iso / sound / c_labs / sb16 / upg310.exe / UPDATE.BAT < prev   
DOS Batch File  |  1994-11-09  |  5KB  |  108 lines

  1. cls
  2. @if "%1"=="" goto need_directory 
  3. @echo *********************************************************************
  4. @echo *                                                                   *
  5. @echo *                 EZ-SCSI 3.1 - Upgrade Program                     *
  6. @echo *                 ------------------------------                    *
  7. @echo *                                                                   *
  8. @echo *      Welcome to the EZ-SCSI 3.1 Upgrade Program.  In order        *
  9. @echo *      for this upgrade program to run successfully you need to     *
  10. @echo *      have a previous version of EZ-SCSI already installed on      *
  11. @echo *      your system.                                                 *
  12. @echo *                                                                   *
  13. @echo *                                                                   *
  14. @echo *      This program will create the directory \OLDSYS where         *
  15. @echo *      the older version of your software will be stored.           * 
  16. @echo *      Consult the README.TXT file for further information          *
  17. @echo *      on this upgrade program.                                     *
  18. @echo *                                                                   *
  19. @echo *********************************************************************
  20. @rem pause
  21. @rem
  22. @rem ----------------------------------------------------------------------
  23. @rem Note: %1 = user's path for where ezscsi is installed on their drive.
  24. @rem       We redirect the output of the upgrade procedure to the file
  25. @rem       UPINFO.TXT.  
  26. @rem       Currently this file contains nothing more than the header for
  27. @rem       the RTPatch program,  but we can allow it to contain all of the
  28. @rem       information regarding the upgrade procedure by rebuilding the
  29. @rem       patch with NOMESSAGE and QUITE eliminated from the configuration
  30. @rem       set.
  31. @rem -----------------------------------------------------------------------
  32. @echo Performing update...please wait
  33. @echo (This process can take up to 5 minutes depending on your system.)
  34. @echo ...working...
  35. @rem
  36. @rem
  37. @rem -----------------------------------------------------------------------
  38. @rem   PATCH.EXE and PATCH.RTP, the two files necessary to carry out the
  39. @rem   patch program are renamed to reduce confusion for customer to *.inc.
  40. @rem   Here is where we rename them back to their executable extensions to
  41. @rem   allow the patch to operate.  We rename them back to *.inc at the end
  42. @rem   of this program.
  43. @rem -----------------------------------------------------------------------
  44. @rename patch1.inc patch.exe
  45. @rename patch2.inc patch.rtp
  46. @patch %1 > UPINFO.TXT
  47. @if ERRORLEVEL 1 goto failed_upgrade
  48. @rem -----------------------------------------------------------------------
  49. @rem Here we copy the upgrade readme file to the user's EZ-SCSI directory.
  50. @rem -----------------------------------------------------------------------
  51. @del UPINFO.TXT
  52. @echo.
  53. @echo Update Complete!
  54. @echo.
  55. @echo Copying README.TXT to %1 ...
  56. @copy *.txt %1
  57. @echo.
  58. @if ERRORLEVEL 1 goto failed_readme_copy
  59. @goto end
  60. :need_directory
  61. @cls
  62. @echo **********************************************************************
  63. @echo *                                                                    *
  64. @echo *        You need to type the directory of your current EZ-SCSI      *
  65. @echo *        installation after UPDATE as follows:                       *
  66. @echo *                                                                    *
  67. @echo *                       UPDATE C:\SCSI                               *
  68. @echo *                                                                    *
  69. @echo **********************************************************************
  70. @pause
  71. @goto failed
  72.  
  73. :failed_upgrade
  74. cls
  75. @echo Update failed!
  76. @rem --------------------------------------------------------------------
  77. @rem Renaming patch files back to non-executable extensions
  78. @rem --------------------------------------------------------------------
  79. @rename patch.exe patch1.inc
  80. @rename patch.rtp patch2.inc
  81. @pause
  82. @goto failed
  83.  
  84. :failed_readme_copy
  85. @cls
  86. @echo Update was successful!
  87. @echo Unable to copy README.TXT to %1
  88. @rem --------------------------------------------------------------------
  89. @rem Renaming patch files back to non-executable extensions
  90. @rem --------------------------------------------------------------------
  91. @rename patch.exe patch1.inc
  92. @rename patch.rtp patch2.inc
  93. @goto failed
  94.  
  95. :end
  96. @rem --------------------------------------------------------------------
  97. @rem Renaming patch files back to non-executable extensions
  98. @rem --------------------------------------------------------------------
  99. @rename patch.exe patch1.inc
  100. @rename patch.rtp patch2.inc
  101. @echo Update program completed.
  102. @echo.
  103. @pause
  104. cls
  105.  
  106. :failed
  107.  
  108.